package com.ruoyi.system.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.TbComponentinfo;
import com.ruoyi.system.service.ITbComponentinfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: zhoupeng
 * @date: 2021/9/16 22:38
 * @descreption: 测试站统计
 */
@Controller
@RequestMapping("/system/stationStatistic")
public class StationStatistic extends BaseController {

    private String prefix = "system/stationStatistic";

    @Resource
    private ITbComponentinfoService tbComponentinfoService;

    @RequiresPermissions("system:stationStatistic:view")
    @GetMapping()
    public String stationStatistic() {
        return prefix + "/stationStatistic";
    }

    /**
     * 查询数据
     */
    @PostMapping("list")
    @ResponseBody
    public TableDataInfo list(TbComponentinfo tbComponentinfo) {
        startPage();
        List<TbComponentinfo> list = tbComponentinfoService.selectTbComponentinfoList(tbComponentinfo);
        return getDataTable(list);
    }
}
